<%@ page import="com.jsp.before.entity.Student" %>
<%@ page import="java.util.List" %><%--
  Created by IntelliJ IDEA.
  User: wzm
  Date: 2023/3/8
  Time: 16:13
  To change this template use File | Settings | File Templates.
--%>

<%@ page contentType="text/html;charset=UTF-8" language="java" isELIgnored="false" %>

<html>
<head>
	<title>Title</title>
</head>
<body>
<%--获取域对象中的数据 进行显示--%>
<%
	List<Student> studentList =(List<Student>) request.getAttribute("stuList");
%>

<table>
	<tr>
		<td>编号</td>
		<td>姓名</td>
		<td>年龄</td>
		<td>电话</td>
		<td>操作</td>
	</tr>
	<%--遍历集合中学生的信息--%>
	<%
		for(Student stu:studentList){
	%>
	<tr>
		<td><%=stu.getId()%></td>
		<td><%=stu.getName()%></td>
		<td><%=stu.getAge()%></td>
		<td><%=stu.getPhone()%></td>
<%--		${stu.id}--%>
		<td>删除、修改</td>
	</tr>
	<%}%>
</table>

<%--el表达式--%>
<%--获取域对象中的数据  如果名字一样 按照优先级--%>
${stuList}
<%--${applicationScope.stuList}--%>

</body>
</html>
